package com.shrct.businessprocess.product.impl;

import com.shrct.businessprocess.organization.RCEnterprise;
import com.shrct.businessprocess.product.RCProductPurchaseInfo;
import com.shrct.businessprocess.product.RCProductPurchaseInfoCriteria1;
import edu.fudan.mylang.pf.query.HQLBasedPagedQueryCriteria;
import org.hibernate.Query;

public class RCProductPurchaseInfoCriteria1Impl extends HQLBasedPagedQueryCriteria<RCProductPurchaseInfo> implements RCProductPurchaseInfoCriteria1 {
  private RCEnterprise enterprise;
  
  public RCEnterprise getEnterprise() {
    return this.enterprise;
  }
  
  public RCProductPurchaseInfoCriteria1 setEnterprise(final RCEnterprise enterprise) {
    this.enterprise = enterprise;
    return this;			
    
  }
  
  protected String buildHQLFrom() {
    return " from com.shrct.businessprocess.product.impl.RCProductPurchaseInfoImpl this ";
  }
  
  protected String buildHQLBody() {
    String hql = "where 1 = 1 ";
    return hql;
    
  }
  
  public void initOrderBys() {
    
  }
  
  protected void fillParameter(final Query query) {
    if( !edu.fudan.mylang.pf.query.QueryUtil.isNull(getEnterprise())){
    	query.setParameter("enterprise",getEnterprise()) ;
    }			
    
  }
  
  protected Boolean isDistinct() {
    return false;
  }
  
  public RCProductPurchaseInfoCriteria1Impl() {
    initOrderBys();
  }
}
